<template>
	<div class="foSi14 poRel" style="padding: 20px;">
		<div class="borRad20 coFFF hei34 dis disAl cuPo poAbs fanhui bac6b7" @click.stop="fanhui()">返回</div>
		<div style="height: 30px;" />
		<div class="mar" style="width: 840px;">
			<el-form ref="ruleForm1" :model="ruleForm1" :rules="rules1">
				<div class="poRel">
					<div class="foSi12 titl">预约时间设置</div>
					<div class="hei44 dis disAl item-l mar-bott10" style="padding: 0 15px;">
						<div class="label">私教模式</div>
						<div class="dis disAl">
							<div class="dis disAl cuPo" @click.stop="ruleForm1.private_mode = 1">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.private_mode === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">私教排课模式</div>
							</div>
							<div class="dis disAl cuPo mar-left30" @click.stop="ruleForm1.private_mode = 2">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.private_mode === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">私教自由预约模式</div>
							</div>
						</div>
					</div>
					<div class="dis item-l mar-bott30" style="padding: 5px 15px;">
						<div class="label">私教预约</div>
						<div>
							<div class="dis disAl mar-bott10">
								<div class="mar-left10 mar-right5">每天</div>
								<el-select v-model="ruleForm1.res_hour1" class="sel" style="width: 60px;">
									<el-option v-for="(item,index) in shiList" :key="index" :label="item.label"
										:value="item.value" />
								</el-select>
								<div class="mar-left5 mar-right5">:</div>
								<el-select v-model="ruleForm1.res_minute1" class="sel" style="width: 60px;">
									<el-option v-for="(item,index) in fenList" :key="index" :label="item.label"
										:value="item.value" />
								</el-select>
								<div class="mar-left10 mar-right10">至</div>
								<el-select v-model="ruleForm1.res_hour2" class="sel" style="width: 60px;">
									<el-option v-for="(item,index) in shiList" :key="index" :label="item.label"
										:value="item.value" />
								</el-select>
								<div class="mar-left5 mar-right5">:</div>
								<el-select v-model="ruleForm1.res_minute2" class="sel" style="width: 60px;">
									<el-option v-for="(item,index) in fenList" :key="index" :label="item.label"
										:value="item.value" />
								</el-select>
								<div class="mar-left5">接受自主预约</div>
							</div>
							<div v-if="ruleForm1.private_mode === 2" class="dis disAl mar-bott10">
								<div class="mar-left5 mar-right15">老师空闲时间可约，会员需早于开课前 </div>
								<el-form-item prop="advance2" class="mp0">
									<el-input v-model="ruleForm1.advance2" class="cen" style="width: 80px;"
										placeholder="不限制" />
								</el-form-item>
								<div class="mar-left5">分钟自主预约</div>
							</div>
							<div v-if="ruleForm1.private_mode === 2" class="dis disAl mar-bott10">
								<div class="mar-left5 mar-right15">课前休息</div>
								<el-form-item prop="course_before" class="mp0">
									<el-input v-model="ruleForm1.course_before" class="cen" style="width: 80px;"
										placeholder="不限制" />
								</el-form-item>
								<div class="mar-left10 mar-right5">分钟，课后休息</div>
								<el-form-item prop="course_after" class="mp0">
									<el-input v-model="ruleForm1.course_after" class="cen" style="width: 80px;"
										placeholder="不限制" />
								</el-form-item>
								<div class="mar-left5">分钟</div>
							</div>
							<!-- <div class="dis disAl">
								<div class="mar-left5 mar-right15">老师可预约时间段每</div>
								<el-select v-model="ruleForm1.endFen" class="sel" style="width: 80px;">
									<el-option v-for="(item,index) in fenList" :key="index" :label="item.label"
										:value="item.value" />
								</el-select>
								<div class="mar-left5">分钟为一个间隔</div>
							</div> -->
						</div>
					</div>
					<div class="foSi12 titl">签到设置</div>
					<div class="hei44 dis disAl item-l mar-bott10" style="padding: 0 15px;">
						<div class="label">自主签到</div>
						<div class="dis disAl">
							<div class="dis disAl cuPo" @click.stop="ruleForm1.selfCheck = 1">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.selfCheck === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">开启</div>
							</div>
							<div class="dis disAl cuPo mar-left30" @click.stop="ruleForm1.selfCheck = 2">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.selfCheck === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">关闭</div>
							</div>
						</div>
					</div>
					<div v-if="ruleForm1.selfCheck === 1" class="dis item-l mar-bott10" style="padding: 5px 15px;">
						<div class="label">签到时间</div>
						<div>
							<div class="dis disAl mar-bott10 hei34">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.selfCheckTime = 1">
									<div v-if="ruleForm1.selfCheckTime === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">课程当天，会员可随时签到</div>
							</div>
							<div class="dis disAl mar-bott10 hei34">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.selfCheckTime = 2">
									<div v-if="ruleForm1.selfCheckTime === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">课程当天，会员可在课程结束前签到</div>
							</div>
							<div class="dis disAl">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.selfCheckTime = 3">
									<div v-if="ruleForm1.selfCheckTime === 3" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5 mar-right15">课程当天，会员可在课程结束后</div>
								<el-form-item prop="selfCheckFenTime" class="mp0">
									<el-input v-model="ruleForm1.selfCheckFenTime" class="cen" style="width: 80px;"
										placeholder="0" />
								</el-form-item>
								<div class="mar-left5">分钟内签到</div>
							</div>
						</div>
					</div>
					<div class="hei44 dis disAl item-l mar-bott10" style="padding: 0 15px;">
						<div class="label">扫码签到</div>
						<div class="dis disAl">
							<div class="dis disAl cuPo" @click.stop="ruleForm1.codeScan = 1">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.codeScan === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">开启</div>
							</div>
							<div class="dis disAl cuPo mar-left30" @click.stop="ruleForm1.codeScan = 2">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.codeScan === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">关闭</div>
							</div>
						</div>
					</div>
					<div v-if="ruleForm1.codeScan === 1" class="dis item-l mar-bott10" style="padding: 5px 15px;">
						<div class="label">签到时间</div>
						<div>
							<div class="dis disAl mar-bott10 hei34">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.codeScanTime = 1">
									<div v-if="ruleForm1.codeScanTime === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">课程当天，会员可签到两小时内开始的课程</div>
							</div>
							<div class="dis disAl mar-bott10 hei34">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.codeScanTime = 2">
									<div v-if="ruleForm1.codeScanTime === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">课程当天，会员可在课程结束前扫码签到</div>
							</div>
							<div class="dis disAl">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.codeScanTime = 3">
									<div v-if="ruleForm1.codeScanTime === 3" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5 mar-right15">课程当天，会员可在课程开始前</div>
								<el-form-item prop="codeScanEnd" class="mp0">
									<el-input v-model="ruleForm1.codeScanEnd" class="cen" style="width: 80px;"
										placeholder="0" />
								</el-form-item>
								<div class="mar-left5 mar-right5">分钟至课程结束后</div>
								<el-form-item prop="codeScanEndTime" class="mp0">
									<el-input v-model="ruleForm1.codeScanEndTime" class="cen" style="width: 80px;"
										placeholder="0" />
								</el-form-item>
								<div class="mar-left5">分钟内扫码签到</div>
							</div>
						</div>
					</div>
					<!-- <div class="hei44 dis disAl item-l mar-bott30" style="padding: 0 15px;">
						<div class="label">面容签到</div>
						<div class="dis disAl">
							<div class="dis disAl cuPo" @click.stop="ruleForm1.features = 1">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.features === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">开启</div>
							</div>
							<div class="dis disAl cuPo mar-left30" @click.stop="ruleForm1.features = 2">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.features === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">关闭</div>
							</div>
						</div>
					</div> -->
					<div class="setting-tips__normal mar-bott10">
						<svg-icon icon-class="tishi" class="mar0" style="width: 16px;height: 16px;" />
						<span>预约取消设置仅针对会员支付的约课，无卡支付的约课暂不支持会员自主预约取消</span>
					</div>
					<div class="foSi12 titl">预约取消设置</div>
					<div class="hei44 dis disAl item-l mar-bott10" style="padding: 0 15px;">
						<div class="label">自主取消</div>
						<div class="dis disAl">
							<div class="dis disAl cuPo" @click.stop="ruleForm1.selfCancel = 1">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.selfCancel === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">开启</div>
							</div>
							<div class="dis disAl cuPo mar-left30" @click.stop="ruleForm1.selfCancel = 2">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.selfCancel === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">关闭</div>
							</div>
						</div>
					</div>
					<div v-if="ruleForm1.selfCancel === 1" class="dis item-l mar-bott30" style="padding: 5px 15px;">
						<div class="label">取消时间</div>
						<div>
							<div class="dis disAl mar-bott10">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.s_selfCancel = 1">
									<div v-if="ruleForm1.s_selfCancel === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5 mar-right15">会员自主取消不晚于开课前</div>
								<el-form-item prop="selfCancelTime1" class="mp0">
									<el-input v-model="ruleForm1.selfCancelTime1" class="cen" style="width: 80px;"
										placeholder="0" />
								</el-form-item>
								<div class="mar-left5">分钟</div>
							</div>
							<div class="dis disAl mar-bott10">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.s_selfCancel = 2">
									<div v-if="ruleForm1.s_selfCancel === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5 mar-right15">会员自主取消不晚于开课后</div>
								<el-form-item prop="selfCancelTime2" class="mp0">
									<el-input v-model="ruleForm1.selfCancelTime2" class="cen" style="width: 80px;"
										placeholder="0" />
								</el-form-item>
								<div class="mar-left5">分钟</div>
							</div>
							<div class="dis disAl">
								<div class="dis disAl disJuC bacFFF borRad50 cuPo"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;"
									@click.stop="ruleForm1.s_selfCancel = 3">
									<div v-if="ruleForm1.s_selfCancel === 3" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5 mar-right15">会员自主取消不晚于课程结束后</div>
								<el-form-item prop="selfCancelTime3" class="mp0">
									<el-input v-model="ruleForm1.selfCancelTime3" class="cen" style="width: 80px;"
										placeholder="0" />
								</el-form-item>
								<div class="mar-left5">分钟</div>
							</div>
						</div>
					</div>
					<div class="foSi12 titl">私教教室设置</div>
					<div class="hei44 dis disAl item-l mar-bott10" style="padding: 0 15px;">
						<div class="label">教室分配</div>
						<div class="dis disAl">
							<div class="dis disAl cuPo" @click.stop="ruleForm1.classroom = 1">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.classroom === 1" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">系统自动为会员分配空闲教室</div>
							</div>
							<div class="dis disAl cuPo mar-left30" @click.stop="ruleForm1.classroom = 2">
								<div class="dis disAl disJuC bacFFF borRad50"
									style="width: 14px;height: 14px;border: 1px solid #6b7cdd;">
									<div v-if="ruleForm1.classroom === 2" class="borRad50"
										style="width: 6px;height: 6px;background: #6b7cdd;" />
								</div>
								<div class="mar-left5">不分配，到店协商</div>
							</div>
						</div>
					</div>
				</div>
			</el-form>
		</div>
		<div class="dis disAl disJuC " style="padding: 30px 0;">
			<div class="dis disAl hei34 borRad20 coFFF cuPo bac6b7" style="padding: 0 24px;"
				@click.stop="submitForm('ruleForm1')">保存</div>
			<div class="mar-left30 dis disAl hei34 borRad20 coFFF cuPo" style="background: #616b74;padding: 0 24px;"
				@click.stop="fanhui()">取消</div>
		</div>
	</div>
</template>

<script>
	import {
		getXuan
	} from '@/utils/limits.js'
	import {
		mapGetters
	} from 'vuex' // Secondary package based on el-pagination
	import {
		ReservationEdit,
		ReservationDetail
	} from '@/api/system'
	export default {
		name: 'orderRuleSettingForPrivate',
		components: {},
		data() {
			const valPnull = (rule, value, callback) => {
				var reg = new RegExp('^-?[0-9]*.?[0-9]*$')
				if (!reg.test(value) || (!value && value !== 0) || value < 0) {
					callback(new Error('请输入整数'))
				} else {
					callback()
				}
			}
			const validateSelfCheckFenTime = (rule, value, callback) => {
				var reg = new RegExp('^-?[0-9]*.?[0-9]*$')
				if (this.ruleForm1.selfCheck === 1 && this.ruleForm1.selfCheckTime === 3) {
					if (!reg.test(value) || (!value && value !== 0) || value < 0) {
						callback(new Error('请输入整数'))
					} else {
						callback()
					}
				} else {
					callback()
				}
			}
			const validateCodeScan = (rule, value, callback) => {
				var reg = new RegExp('^-?[0-9]*.?[0-9]*$')
				if (this.ruleForm1.codeScan === 1 && this.ruleForm1.codeScanTime === 3) {
					if (!reg.test(value) || (!value && value !== 0) || value < 0) {
						callback(new Error('请输入整数'))
					} else {
						callback()
					}
				} else {
					callback()
				}
			}
			const validateSelfCancelTime1 = (rule, value, callback) => {
				var reg = new RegExp('^-?[0-9]*.?[0-9]*$')
				if (this.ruleForm1.selfCancel === 1 && this.ruleForm1.s_selfCancel === 1) {
					if (!reg.test(value) || (!value && value !== 0) || value < 0) {
						callback(new Error('请输入整数'))
					} else {
						callback()
					}
				} else {
					callback()
				}
			}
			const validateSelfCancelTime2 = (rule, value, callback) => {
				var reg = new RegExp('^-?[0-9]*.?[0-9]*$')
				if (this.ruleForm1.selfCancel === 1 && this.ruleForm1.s_selfCancel === 2) {
					if (!reg.test(value) || (!value && value !== 0) || value < 0) {
						callback(new Error('请输入整数'))
					} else {
						callback()
					}
				} else {
					callback()
				}
			}
			const validateSelfCancelTime3 = (rule, value, callback) => {
				var reg = new RegExp('^-?[0-9]*.?[0-9]*$')
				if (this.ruleForm1.selfCancel === 1 && this.ruleForm1.s_selfCancel === 3) {
					if (!reg.test(value) || (!value && value !== 0) || value < 0) {
						callback(new Error('请输入整数'))
					} else {
						callback()
					}
				} else {
					callback()
				}
			}
			return {
				url: '',
				shiList: [],
				fenList: [],
				ruleForm1: {
					private_mode: 2,
					res_hour1: 0,
					res_minute1: 0,
					res_hour2: 0,
					res_minute2: 0,
					advance2: null,
					course_before: null,
					course_after: null,

					selfCheck: 2,
					selfCheckTime: 2,
					selfCheckFenTime: 0,
					codeScan: 1,
					codeScanTime: 2,
					codeScanEnd: 0,
					codeScanEndTime: 0,
					// features: 1,
					selfCancel: 1,
					s_selfCancel: 1,
					selfCancelTime1: 30,
					selfCancelTime2: 0,
					selfCancelTime3: 0,
					classroom: 1
				},
				rules1: {
					advance2: [{
						required: true,
						trigger: 'blur',
						validator: valPnull
					}],
					course_before: [{
						required: true,
						trigger: 'blur',
						validator: valPnull
					}],
					course_after: [{
						required: true,
						trigger: 'blur',
						validator: valPnull
					}],
					selfCheckFenTime: [{
						required: true,
						trigger: 'blur',
						validator: validateSelfCheckFenTime
					}],
					codeScanEnd: [{
						required: true,
						trigger: 'blur',
						validator: validateCodeScan
					}],
					codeScanEndTime: [{
						required: true,
						trigger: 'blur',
						validator: validateCodeScan
					}],
					selfCancelTime1: [{
						required: true,
						trigger: 'blur',
						validator: validateSelfCancelTime1
					}],
					selfCancelTime2: [{
						required: true,
						trigger: 'blur',
						validator: validateSelfCancelTime2
					}],
					selfCancelTime3: [{
						required: true,
						trigger: 'blur',
						validator: validateSelfCancelTime3
					}]
				}
			}
		},
		computed: {
			...mapGetters([
				'permission_routes',
				'roles'
			])
		},
		created() {
			let i
			this.url = '/system/orderRuleForPrivate'
			var xuanList = [{
				name: '通用设置',
				url: '/system/orderRuleForCommon',
				pd: true
			}, {
				name: '团课',
				url: '/system/orderRuleForLeague',
				pd: true
			}, {
				name: '精品课',
				url: '/system/orderRuleForQuality',
				pd: true
			}, {
				name: '私教课',
				url: '/system/orderRuleForPrivate',
				pd: true
			}]
			var xuanList1 = getXuan(xuanList, this.roles)
			this.$store.dispatch('user/changeXuan', {
				key: 'xuanList',
				value: xuanList1
			})
			this.$store.dispatch('user/changeXuan', {
				key: 'xuan',
				value: 3
			})
			for (i = 0; i < 24; i++) {
				this.shiList.push({
					label: i < 10 ? '0' + i : i,
					value: i
				})
			}
			// console.log('执行啊')
			for (i = 0; i < 60; i += 5) {
				this.fenList.push({
					label: i < 10 ? '0' + i : i,
					value: i
				})
			}
			this.getList()
		},
		methods: {
			fanhui() {
				this.$router.go(-1)
			},
			submitForm(formName) {
				this.$refs[formName].validate((valid) => {
					if (valid) {
						const params = {
							'type': 3,
							'private_mode': this.ruleForm1.private_mode,
							'res_hour1': this.ruleForm1.res_hour1,
							'res_minute1': this.ruleForm1.res_minute1,
							'res_hour2': this.ruleForm1.res_hour2,
							'res_minute2': this.ruleForm1.res_minute2,
							'advance2': this.ruleForm1.advance2,
							'course_before': this.ruleForm1.course_before,
							'course_after': this.ruleForm1.course_after,
							'classroom': this.ruleForm1.classroom,
							'self_check': this.ruleForm1.selfCheck,
							'check_in_type1': this.ruleForm1.selfCheckTime,
							'check_front_minute1': this.ruleForm1.selfCheckFenTime,
							'scan_check': this.ruleForm1.codeScan,
							'check_in_type': this.ruleForm1.codeScanTime,
							'check_front_minute': this.ruleForm1.codeScanEnd,
							'check_after_minute': this.ruleForm1.codeScanEndTime,
							'self_cancel': this.ruleForm1.selfCancel,
							'self_cancel_type': this.ruleForm1.s_selfCancel,
							'cancel_front_minute': this.ruleForm1.selfCancelTime1,
							'cancel_start_minute': this.ruleForm1.selfCancelTime2,
							'cancel_after_minute': this.ruleForm1.selfCancelTime3
						}
						ReservationEdit(params).then(response => {
							const {
								data
							} = response
							console.log(data)
							this.fanhui()
						}).catch(error => {
							console.log(error)
							this.loading = false
						})
					} else {
						this.$message.error('请按规则填写完整信息')
						return false
					}
				})
			},
			getList() {
				const params = {
					type: 3
				}
				ReservationDetail(params).then(response => {
					const {
						data
					} = response
					console.log(response)
					if (data) {
						this.ruleForm1 = {
							private_mode: data.private_mode,
							res_hour1: data.res_hour1,
							res_minute1: data.res_minute1,
							res_hour2: data.res_hour2,
							res_minute2: data.res_minute2,
							advance2: data.advance2,
							course_before: data.course_before,
							course_after: data.course_after,
							// advance: null,
							selfCheck: data.self_check,
							selfCheckTime: data.check_in_type1,
							selfCheckFenTime: data.check_front_minute1,
							codeScan: data.scan_check,
							codeScanTime: data.check_in_type,
							codeScanEnd: data.check_front_minute,
							codeScanEndTime: data.check_after_minute,
							selfCancel: data.self_cancel,
							s_selfCancel: data.self_cancel_type,
							selfCancelTime1: data.cancel_front_minute,
							selfCancelTime2: data.cancel_start_minute,
							selfCancelTime3: data.cancel_after_minute,
							// features: null,
							classroom: data.classroom
						}
					}
					console.log(this.ruleForm1)
					this.listLoading = false
				}).catch(error => {
					console.log(error)
					this.listLoading = false
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.fanhui {
		background: #48a9f3;
		padding: 0 24px;
		right: 63px;
		top: 10px;
		z-index: 10;
	}

	.titl {
		height: 25px;
		color: #787878;
	}

	.field {
		padding: 5px 15px;
		margin-bottom: 8px;
		background: #f2f2f2;
	}

	.label {
		float: left;
		width: 135px;
		min-height: 32px;
		line-height: 32px;
		padding-right: 10px;
		white-space: nowrap;
	}

	.item-l {
		background: #f2f2f2;
	}

	.item-r {
		width: 420px;
		padding: 0 15px;
	}

	.col {
		width: 36px;
		height: 36px;
		margin: 0 4px 3px 0;
	}

	.class-desc {
		width: 721px;
		height: 230px;
		border: 1px solid #d9d9d9;
		padding: 5px;
		line-height: 1.5;
	}

	.rich-insert {
		width: 100%;
		height: 30px;
		padding: 2px 5px;
		position: relative;
		vertical-align: text-top;
		box-sizing: border-box;
		overflow: hidden;
		display: flex;
		align-items: center;
	}

	.rich-row {
		width: 100%;
		height: calc(100% - 31px);
		border: 0;
		background-color: #fff;
		box-sizing: border-box;
		padding: 5px;
		margin-top: 1px;
		outline: 0;
		overflow-y: scroll;
		overflow-x: hidden;
	}

	::v-deep .el-upload:focus {
		color: #000 !important;
	}

	::v-deep .el-upload-list {
		display: none;
	}

	.sel ::v-deep .el-input--medium .el-input__inner {
		padding: 0 20px 0 10px;
	}

	.cen ::v-deep .el-input__inner {
		text-align: center;
	}

	.setting-tips__normal {
		padding: 10px 15px;
		display: flex;
		align-items: center;
		border: 1px dashed #6b7cdd;
		color: #6b7cdd;
	}

	::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
		background-color: #6b7cdd;
		border-color: #6b7cdd;
	}

	::v-deep .el-checkbox__input.is-focus .el-checkbox__inner {
		border-color: #6b7cdd;
	}

	::v-deep .el-checkbox__label {
		color: #000 !important;
	}

	.img-size-tips {
		position: absolute;
		top: 3px;
		left: 5px;
		z-index: 10;
		color: #fff;
		font-size: 12px;
	}

	.avatar-tips {
		position: absolute;
		bottom: 3px;
		left: 5px;
		z-index: 10;
		color: #fff;
		font-size: 12px;
	}

	.que {
		display: inline-block;
		padding: 0 24px;
		height: 34px;
		line-height: 34px;
		text-align: center;
		vertical-align: top;
	}
</style>